package org.middleware.component;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MessageConsumer {

    @RabbitListener(queues = "JYT")
    public void receiveMessage(String message) {
        System.out.println("收到消息：" + message);
    }

//    @RabbitListener(queues = {"JYT1", "JYT2"})
//    public void receiveMessagesFromMultipleQueues(String message) {
//        // 处理消息
//    }

}
